package red.stu.mc.mod.codeblock.block;

import net.minecraft.block.BlockContainer;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.world.World;
import red.stu.mc.mod.codeblock.tileentity.TileEntityExceptionBlock;

public class BlockExceptionBlock extends BlockContainer {

	protected BlockExceptionBlock() {
		super(Material.IRON, MapColor.BLUE);
		super.setUnlocalizedName("exception_block");
		super.setHardness(0.6f); // 徒手硬度：泥土是0.5,石头是1.5,大部分矿石是3.0
		super.setResistance(50.0f); // 爆炸的抗性,石头是10.0
		super.setLightLevel(0f); // 发光亮度,范围是0.0~1.0,南瓜灯,萤石和岩浆是1.0,通往下界的传送门是0.75.采集中的红石是0.625.
		super.setHarvestLevel(null, -1); // 开采砖块时需要使用的工具,可以是"pickaxe"(镐),
											// "shovel"(铲子)或"axe"(斧头).后面的数值为工具材质要求,-1(默认值)为可以直接手撕,0是木质和金质,1是石质,2是铁质,3是钻石质.
		super.setSoundType(SoundType.STONE);
		super.setCreativeTab(CreativeTabs.REDSTONE); // 设置创造模式表物品栏
	}

	@Override
	public TileEntity createNewTileEntity(World worldIn, int meta) {
		return new TileEntityExceptionBlock();
	}
	
	@Override
	public int tickRate(World worldIn) {
		return 1;
	}

	@Override
	public EnumBlockRenderType getRenderType(IBlockState state) {
		return EnumBlockRenderType.MODEL;
	}
	
}
